.horizontal & { padding-left: $base_padding*2; }
}
-.candidate-page-button { padding: $base_padding;}
+.candidate-page-button {
+ padding: $base_padding;
+
+ & StIcon { icon-size: $base_icon_size; }
+}
.candidate-page-button-previous { border-radius: $base_border_radius 0px 0px $base_border_radius; border-right-width: 0;box-shadow: none;}
.candidate-page-button-next { border-radius: 0px $base_border_radius $base_border_radius 0px;box-shadow: none;}
-.candidate-page-button-icon { icon-size: $base_icon_size; }
color: $insensitive_fg_color;
&:hover { color: lighten($insensitive_fg_color, 20%); }
&:active { color: darken($insensitive_fg_color, 20%); }
+
+ & StIcon { icon-size: 12px; }
}
}
margin: 1px;
&:hover {background-color: transparentize($fg_color, 0.8);}
&:active {background-color: transparentize($fg_color, 0.9);}
+
+ & StIcon { icon-size: $base_icon_size; }
}
// body
// fix margin for last button
&:last-child:ltr { margin-right: $base_margin*3; }
&:last-child:rtl { margin-left: $base_margin*3; }
+
+ & StIcon { icon-size: $base_icon_size; }
}
// album-art
can_focus: this._hasCancelButton,
x_align: Clutter.ActorAlign.START,
y_align: Clutter.ActorAlign.CENTER,
- child: new St.Icon({ icon_name: 'go-previous-symbolic' }),
+ icon_name: 'go-previous-symbolic',
});
if (this._hasCancelButton)
this.cancelButton.connect('clicked', () => this.cancel());
Signals: { 'session-activated': { param_types: [GObject.TYPE_STRING] } },
}, class SessionMenuButton extends St.Bin {
_init() {
- let gearIcon = new St.Icon({ icon_name: 'emblem-system-symbolic' });
let button = new St.Button({
style_class: 'modal-dialog-button button login-dialog-session-list-button',
+ icon_name: 'emblem-system-symbolic',
reactive: true,
track_hover: true,
can_focus: true,
accessible_role: Atk.Role.MENU,
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
- child: gearIcon,
});
super._init({ child: button });
can_focus: true,
x_align: Clutter.ActorAlign.END,
y_align: Clutter.ActorAlign.CENTER,
- child: new St.Icon({
- icon_name: 'document-edit-symbolic',
- icon_size: 16,
- }),
+ icon_name: 'document-edit-symbolic',
});
this._editButton.connect('notify::checked', () => {
this._backButton = new St.Button({
style_class: 'calendar-change-month-back pager-button',
+ icon_name: 'pan-start-symbolic',
accessible_name: _('Previous month'),
can_focus: true,
});
- this._backButton.add_actor(new St.Icon({ icon_name: 'pan-start-symbolic' }));
this._topBox.add(this._backButton);
this._backButton.connect('clicked', this._onPrevMonthButtonClicked.bind(this));
this._forwardButton = new St.Button({
style_class: 'calendar-change-month-forward pager-button',
+ icon_name: 'pan-end-symbolic',
accessible_name: _('Next month'),
can_focus: true,
});
- this._forwardButton.add_actor(new St.Icon({ icon_name: 'pan-end-symbolic' }));
this._topBox.add(this._forwardButton);
this._forwardButton.connect('clicked', this._onNextMonthButtonClicked.bind(this));
style_class: 'candidate-page-button candidate-page-button-previous button',
x_expand: true,
});
- this._previousButton.child = new St.Icon({ style_class: 'candidate-page-button-icon' });
this._buttonBox.add_child(this._previousButton);
this._nextButton = new St.Button({
style_class: 'candidate-page-button candidate-page-button-next button',
x_expand: true,
});
- this._nextButton.child = new St.Icon({ style_class: 'candidate-page-button-icon' });
this._buttonBox.add_child(this._nextButton);
this.add(this._buttonBox);
this.vertical = false;
this.remove_style_class_name('vertical');
this.add_style_class_name('horizontal');
- this._previousButton.child.icon_name = 'go-previous-symbolic';
- this._nextButton.child.icon_name = 'go-next-symbolic';
+ this._previousButton.icon_name = 'go-previous-symbolic';
+ this._nextButton.icon_name = 'go-next-symbolic';
} else { // VERTICAL || SYSTEM
this.vertical = true;
this.add_style_class_name('vertical');
this.remove_style_class_name('horizontal');
- this._previousButton.child.icon_name = 'go-up-symbolic';
- this._nextButton.child.icon_name = 'go-down-symbolic';
+ this._previousButton.icon_name = 'go-up-symbolic';
+ this._nextButton.icon_name = 'go-down-symbolic';
}
}
hbox.add(button);
}
- button = new St.Button({ style_class: 'window-close' });
- button.add_actor(new St.Icon({ icon_name: 'window-close-symbolic' }));
+ button = new St.Button({
+ style_class: 'window-close',
+ icon_name: 'window-close-symbolic',
+ });
button.connect('clicked', this.close.bind(this));
hbox.add(button);
if (typeof obj == typeof {}) {
});
const inspectButton = new St.Button({
- child: new St.Icon({
- icon_name: 'insert-object-symbolic',
- icon_size: 12,
- y_align: Clutter.ActorAlign.CENTER,
- }),
+ icon_name: 'insert-object-symbolic',
reactive: true,
x_expand: true,
x_align: Clutter.ActorAlign.START,
this.add_actor(toolbar);
const inspectButton = new St.Button({
style_class: 'lg-toolbar-button',
- child: new St.Icon({
- icon_name: 'find-location-symbolic',
- }),
+ icon_name: 'find-location-symbolic',
});
toolbar.add_actor(inspectButton);
inspectButton.connect('clicked', () => {
const gcButton = new St.Button({
style_class: 'lg-toolbar-button',
- child: new St.Icon({
- icon_name: 'user-trash-full-symbolic',
- }),
+ icon_name: 'user-trash-full-symbolic',
});
toolbar.add_actor(gcButton);
gcButton.connect('clicked', () => {
});
titleBox.add_actor(this._secondaryBin);
- const closeIcon = new St.Icon({
- icon_name: 'window-close-symbolic',
- icon_size: 16,
- });
this._closeButton = new St.Button({
style_class: 'message-close-button',
- child: closeIcon, opacity: 0,
+ icon_name: 'window-close-symbolic',
y_align: Clutter.ActorAlign.CENTER,
+ opacity: 0,
});
titleBox.add_actor(this._closeButton);
}
addMediaControl(iconName, callback) {
- let icon = new St.Icon({ icon_name: iconName, icon_size: 16 });
const button = new St.Button({
style_class: 'message-media-control',
- child: icon,
+ iconName,
});
button.connect('clicked', callback);
this._mediaControls.add_actor(button);
this._player.previous();
});
- this._playPauseButton = this.addMediaControl(null,
+ this._playPauseButton = this.addMediaControl('',
() => {
this._player.playPause();
});
this._closeButton = new St.Button({
style_class: 'screenshot-ui-close-button',
- child: new St.Icon({ icon_name: 'preview-close-symbolic' }),
+ icon_name: 'preview-close-symbolic',
});
this._closeButton.add_constraint(new Clutter.BindConstraint({
source: this._panel,
this._shotButton = new St.Button({
style_class: 'screenshot-ui-shot-cast-button',
+ icon_name: 'camera-photo-symbolic',
checked: true,
});
- this._shotButton.set_child(new St.Icon({ icon_name: 'camera-photo-symbolic' }));
this._shotButton.connect('notify::checked',
this._onShotButtonToggled.bind(this));
this._shotCastContainer.add_child(this._shotButton);
this._castButton = new St.Button({
style_class: 'screenshot-ui-shot-cast-button',
+ icon_name: 'camera-web-symbolic',
toggle_mode: true,
visible: Config.HAVE_RECORDER,
});
- this._castButton.set_child(new St.Icon({ icon_name: 'camera-web-symbolic' }));
this._castButton.connect('notify::checked',
this._onCastButtonToggled.bind(this));
this._shotCastContainer.add_child(this._castButton);
this._showPointerButton = new St.Button({
style_class: 'screenshot-ui-show-pointer-button',
+ icon_name: 'screenshot-ui-show-pointer-symbolic',
toggle_mode: true,
});
- this._showPointerButton.set_child(new St.Icon({ icon_name: 'screenshot-ui-show-pointer-symbolic' }));
this._showPointerButtonContainer.add_child(this._showPointerButton);
this.add_child(new Tooltip(this._showPointerButton, {
opacity: 0,
x_align: Clutter.ActorAlign.END,
y_align: Clutter.ActorAlign.END,
- child: new St.Icon({ icon_name: 'system-users-symbolic' }),
+ icon_name: 'system-users-symbolic',
});
this._otherUserButton.set_pivot_point(0.5, 0.5);
this._otherUserButton.connect('clicked', this._otherUserClicked.bind(this));
this._closeButton = new St.Button({
visible: false,
style_class: 'window-close',
- child: new St.Icon({ icon_name: 'preview-close-symbolic' }),
+ icon_name: 'preview-close-symbolic',
});
this._closeButton.add_constraint(new Clutter.BindConstraint({
source: windowContainer,